<%@ page contentType="text/html; charset=UTF-8" language="java" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib prefix="s" uri="/struts-tags"%>
<html>
  <head>
    <title>航通ITS内部OA系统</title>
    <script type="text/javascript" src="/ItsOAsystem/system/role/js/role.js"></script>
    <link href="/ItsOAsystem/system/role/css/role.css" rel="stylesheet" type="text/css"/>
  </head>
  
  <body>
    <div>
    <s:if test='btnIds.indexOf("add")>-1'><input type="button" id="showWin" name ="showWin" value="新增" onclick="showDiv()"/></s:if>
  		<s:if test='btnIds.indexOf("del")>-1'><input type="button" id="del" name ="del" value="删除" onclick="delRole()"/></s:if>
  	</div>
  	<hr/>
   <table id = "roleTable" border="1" align="center" cellspacing="0" width="90%">
   	<tr>
   		<td width="5%"><s:checkbox id="checkall" name="checkall" theme="simple" onclick="checkAll(this)"/></td>
   		<td width="5%" style="display: none;" align="center">序号</td><td width="30%" align="center">角色代码</td><td width="45%" align="center">角色名称</td>
   	</tr>
   	<s:iterator value="roleList">
   		<tr onclick="selectRow(${id})">
   			<td><s:checkbox id="chk" name="chk" theme="simple" /></td>
   			<td style="display: none;"><s:property value="id" /></td>
   			<td><s:property value="code" /></td>
   			<td><s:property value="name"/></td>
   		</tr>
   	</s:iterator>
   	<tr>
			<td colspan="100" align="center"><jsp:include page="/common/turnPage.jsp"/><br></td>
	</tr>
   </table>
   
   <div id="addRoleWin">
   		<s:form action="addRole.action">
  		<table align="center">
  			<tr><td><s:textfield id="rolecode" name="rolecode" label="模块代码"></s:textfield></td></tr>
  			<tr><td><s:password id="rolename" name="rolename" label="模块名称 "></s:password></td></tr>
  			<tr>
  				<td>
  				<input type="button"  type="button" value="提交" onclick="submitAddUser()" />
  				<input type="button" value="关闭" onclick="closeDiv()"/>	
  				</td>
  			</tr>  		
  		</table>
  	</s:form>
   </div>
  </body>
</html>
